/*
 * Copyright (c) 2020 pig4cloud Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.love.cloud.admin.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author hongdongqu
 */
@Data
@Entity
@Table(name = "sys_user_dept")
@TableName("sys_user_dept")
@EqualsAndHashCode(callSuper = false)
@org.hibernate.annotations.Table(appliesTo = "sys_user_dept",comment="系统用户部门关系表")
public class SysUserDept extends Model<SysUserDept> implements Serializable {

	private static final long serialVersionUID = 1L;
	/**
	 * 用户ID
	 */
	@Id
	@Column(columnDefinition = "bigint(20) COMMENT '用户ID'")
	private Long userId;

	/**
	 * 部门ID
	 */
	@Id
	@Column(columnDefinition = "bigint(20) COMMENT '部门ID'")
	private Long deptId;

	/**
	 * 来源 标识是本地还是来自钉钉同步过来的， 默认本地。 1：本地； 0：钉钉
	 */
	@Column(columnDefinition = "VARCHAR(10) COMMENT '来源 标识是本地还是来自钉钉同步过来的， 默认本地。 1：本地； 0：钉钉' default '1'")
	private String source;

}
